package com.ytrsoft.ws;

import com.ytrsoft.task.ActionFactory;
import org.springframework.stereotype.Component;

import javax.websocket.server.ServerEndpoint;

@Component
@ServerEndpoint(value = "/idea/{id}")
public class IdeaSocketService extends OnceSocketService<IdeaSocket> {

    @Override
    protected IdeaSocket createSocket() {
        return new IdeaSocket();
    }

    @Override
    protected ActionFactory<IdeaSocket> getActionFactory(IdeaSocket socket) {
        return socket.getFactory();
    }

}
